Skip to content

topology: fix bad parameters in generic dmic dai add - #2089

Merged
lgirdwood merged 14 commits into
thesofproject:masterfrom
juimonen:dmic_dai_fix
Nov 25, 2019
Merged

lgirdwood merged 14 commits into
thesofproject:masterfrom
juimonen:dmic_dai_fix

Conversation

@juimonen

Copy link
Copy Markdown

Intel generic dmic pipelines have bad extra parameters in
their dai add macros, so remove them.

Signed-off-by: Jaska Uimonen jaska.uimonen@intel.com

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments below

@plbossart plbossart Nov 12, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those parameters are obviously wrong, but shouldn't we use the TIMER now?
The DMIC is clock master so there's no real benefit in using DMA interrupts here, is there?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, ok someone needs to jump in here, because I don't know this area.... maybe before the wrong value 16000 something has been just interpreted as != 0 -> so timer?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tlauda @lgirdwood see above?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juimonen these are wrong, please validate against the DAI_ADD defn. It looks like we are also missing some macro defs for Time domain, these can be added too in order to avoid ambiguous definitions.

dnl DAI_ADD(pipeline,
dnl     pipe id, dai type, dai_index, dai_be,
dnl     buffer, periods, format,
dnl     period , priority, core, time_domain)
define(`DAI_ADD',
`undefine(`PIPELINE_ID')'
`undefine(`DAI_TYPE')'
`undefine(`DAI_INDEX')'
`undefine(`DAI_BE')'
`undefine(`DAI_BUF')'
`undefine(`DAI_PERIODS')'
`undefine(`DAI_FORMAT')'
`undefine(`SCHEDULE_PERIOD')'
`undefine(`SCHEDULE_PRIORITY')'
`undefine(`SCHEDULE_CORE')'
`undefine(`SCHEDULE_TIME_DOMAIN')'
`define(`PIPELINE_ID', $2)'
`define(`DAI_TYPE', STR($3))'
`define(`DAI_INDEX', STR($4))'
`define(`DAI_BE', $5)'
`define(`DAI_BUF', $6)'
`define(`DAI_NAME', $3$4)'
`define(`DAI_PERIODS', $7)'
`define(`DAI_FORMAT', $8)'
`define(`SCHEDULE_PERIOD', $9)'
`define(`SCHEDULE_PRIORITY', $10)'
`define(`SCHEDULE_CORE', $11)'
`define(`SCHEDULE_TIME_DOMAIN', $12)'
`include($1)'
`DEBUG_DAI($3, $4)'

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lgirdwood Pierre's questions was should this be TIMER or DMA...? And I guess it is TIMER as I see only that defined anywhere. And then I see DAI_ADD macros without either TIMER or DMA that compiles to "" in conf files, which is alsp probably not good.... So should those then be DMA?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and forget last comment about not using, was not grepping for tokens... so question is should the empty "" be DOMAIN_DMA?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in below topologies the TIME_DOMAIN is not specified so it is "":

sof-cht-max98090.m4
sof-cht-nocodec.m4
sof-cht-rt5682.m4
sof-imx8qxp-nocodec.m4
sof-imx8qxp-nocodec-sai.m4
sof-imx8qxp-cs42888.m4
sof-imx8qxp-wm8960.m4
sof-hsw-rt5640.m4
sof-bdw-codec.m4
sof-cht-src-50khz-pcm512x.m4
platform/intel/intel-generic-dmic.m4
sof-byt-codec.m4

Any objections I just change it to TIMER in all?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juimonen The imx8qxp ones are 100% DMA-driven, so TIMER might/will break them. No words on the other ones though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juimonen all topologies use the SOC clock master so there's no problem using the TIMER
the two cases where the codec is master is wm8804 and some versions of pcm512x, those would need to remain DMA based.

In general when the DAI uses 'codec_slave' we can use the TIMER.

sof-apl-wm8804.m4:              SSP_CLOCK(bclk, 3072000, codec_master),
sof-apl-wm8804.m4:              SSP_CLOCK(fsync, 48000, codec_master),
sof-imx8qxp-wm8960.m4:          SAI_CLOCK(bclk, 3072000, codec_master),
sof-imx8qxp-wm8960.m4:          SAI_CLOCK(fsync, 48000, codec_master),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tlauda any comment here ?

@juimonen

Copy link
Copy Markdown
Author

@plbossart @paulstelian97 thanks for the info and PR updated. All imx ones should have DMA domain now. I now explicitly defined either TIMER or DMA everywhere. I also found couple of related issues which are separate commits... I have no idea how those topologies have ever worked with all pipelines.

@ranj063

ranj063 commented Nov 14, 2019

Copy link
Copy Markdown
Collaborator

@juimonen Would you mind splitting up the commit per tplg file? It is easy to figure out which commit caused issues when debugging that way

@juimonen
juimonen force-pushed the dmic_dai_fix branch 3 times, most recently from a2fbe54 to 179d639 Compare November 15, 2019 08:48
@juimonen

Copy link
Copy Markdown
Author

@ranj063 @plbossart @paulstelian97 PR now divided per topology file basis. @plbossart I needed to change byt and cht based topology timers to DMA, because CI just went crazy otherwise...

Comment thread tools/topology/sof-imx8qxp-cs42888.m4 Resolved
@juimonen

Copy link
Copy Markdown
Author

@paulstelian97 updated, hope it is more clear now.

@paulstelian97 paulstelian97 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, looks good to me now.

@plbossart

Copy link
Copy Markdown
Member

@ranj063 @plbossart @paulstelian97 PR now divided per topology file basis. @plbossart I needed to change byt and cht based topology timers to DMA, because CI just went crazy otherwise...

yes, my baytrail device went in the weeds with your PR.
I think we should change from DMA to TIMER one platform at a time, separately, with tests done by different people, not just CI.

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep broadwell the way it is and remove haswell

Comment thread tools/topology/sof-bdw-codec.m4 Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably better to keep DMAs on broadwell, this is difficult enough with DMAs alone and IIRC there are no external timers?

Comment thread tools/topology/sof-hsw-rt5640.m4 Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep as DMA.
we need to remove this topology anyways, hsw is not supported

Comment thread tools/topology/sof-bdw-codec.m4 Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave broadwell with DMA

Comment thread tools/topology/sof-hsw-rt5640.m4 Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file, not supported

Jaska Uimonen added 8 commits November 25, 2019 11:25
Fix errorneous parameters in DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD and pipeline.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD and pipeline.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Jaska Uimonen added 6 commits November 25, 2019 11:28
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
sof-cml-rt5682 dmic definition has some extra parameters that should be
removed.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Media pipe is missing the scheduling component, so move it after the dai
definition and add the scheduling component.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Remove as unsupported platform.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
@juimonen
juimonen force-pushed the dmic_dai_fix branch 2 times, most recently from 6ed3d9a to 5bf2207 Compare November 25, 2019 09:34
@juimonen
juimonen requested a review from jajanusz as a code owner November 25, 2019 09:34
@juimonen

Copy link
Copy Markdown
Author

@plbossart updated. bdw changed to dma, hsw removed.

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @juimonen

@lgirdwood

Copy link
Copy Markdown
Member

Internal CI test passed - all green.

@lgirdwood
lgirdwood merged commit db7671a into thesofproject:master Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants